package com.engineering.elink.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.engineering.elink.co.PersonCustomCo;
import com.engineering.elink.domain.PersonCustom;

public interface PersonCustomMapper {
    int deleteByPrimaryKey(Integer pcId);

    int insert(PersonCustom record);

    int insertSelective(PersonCustom record);

    PersonCustom selectByPrimaryKey(Integer pcId);
    
    List<PersonCustom> selectAll (@Param("userId") String userId);

    int updateByPrimaryKeySelective(PersonCustom record);

    int updateByPrimaryKey(PersonCustom record);
    
    int delByUserId(@Param("userId") String userId);
    
	int  insertBatch(@Param("list")List<PersonCustomCo> tagList);
	
	int getMaxSeq(@Param("userId") String userId);
	
	 PersonCustom selectByUnion(@Param("moduleId") int moduleId,@Param("userId") String userId);

	@Update("update person_custom set  is_display = (is_display +1)%2 where  user_id=#{userId} and module_id=#{moduleId}" )
	void update(@Param("moduleId") int moduleId,@Param("userId") String userId);
}